<template>
	<view>
		这里是首页
	</view>
</template>

<script>
	export default {
		name:"homepage",
		data() {
			return {
				
			};
		},
		props:{
			idx: {
				type: Number
			},
			
		},
		watch: {
			idx: {
				handler(newValue,oldVale) {
					if(newValue == 0&&!this.$store.getters.newArr.includes(0)) {
						console.log('首页执行了')
						this.$store.commit('GET_ARR',newValue)
					}
				},
				immediate: true
			}
			
		},
		
	}
</script>

<style lang="scss">

</style>